<template>
  <div class="article-manager video-icon form-submit" id="shopp-manager">
    <div class="i-layout-page-header">
      <PageHeader class="freight_tabs">
        <div slot="title" class="acea-row row-middle">
          <router-link :to="{ path: `${roterPre}/freight/index` }">
            <div class="font-sm after-line">
              <span class="iconfont iconfanhui"></span>
              <span class="pl10">返回</span>
            </div>
          </router-link>
          <span v-text="$route.params.id ? '编辑出库单' : '添加出库单'" class="mr20 ml16"></span>
        </div>
      </PageHeader>
    </div>
    <Card :bordered="false" dis-hover class="ivu-mt">
      <div class="new_tab">
        <Tabs v-model="currentTab" @on-click="onhangeTab">
          <TabPane
              v-for="(item, index) in headTab"
              :key="index"
              :label="item.title"
              :name="item.name"
          ></TabPane>
        </Tabs>
      </div>
      <Form
          class="formValidate mt20"
          ref="formValidate"
          :rules="ruleValidate"
          :model="formValidate"
          :label-width="labelWidth"
          :label-position="labelPosition"
          @submit.native.prevent
      >
        <Row :gutter="24" type="flex" v-show="currentTab === '1'">
          <!-- 订单信息-->
          <Col span="24" class="delivery_type">
            <FormItem label="运送方式：" prop="">
              <Select
                  v-model="formValidate.delivery_type"
                  clearable
                  filterable
                  transfer="true"
                  placeholder="请选择送达方式"
                  v-width="'50%'">
                <Option
                    v-for="(freight, i) in arrivalTypeData"
                    :value="freight.label"
                    :key="freight.value"
                >{{ freight.label }}</Option>
              </Select>
            </FormItem>
          </Col>
          <Col span="24">
            <FormItem label="请求发货日期：" prop="ship_date">
              <DatePicker type="datetime" @on-change="onchangeOff" :options="endPickOptions" :value="formValidate.ship_date" v-model="formValidate.ship_date" placeholder="请选择到达时间" format="yyyy-MM-dd" style="width: 260px;"></DatePicker>
<!--              <div class="tips">开启定时下架后，系统会在设置时间下架该商品。下架时间需晚于开售时间，商品才能定时开售。</div>-->
            </FormItem>
          </Col>

          <Col span="24">
            <FormItem label="采购订单号" prop="order_nos">
              <Input
                  v-width="'50%'"
                  v-model="formValidate.order_nos"
                  placeholder="使用英文逗号分隔多个采购订单号"
              />
            </FormItem>
          </Col>
          <Col span="24">
            <FormItem label="主物流大号" prop="tracking_number">
              <Input
                  v-width="'50%'"
                  v-model="formValidate.tracking_number"
                  placeholder="使用英文逗号分隔多个采购订单号"
              />
            </FormItem>
          </Col>
        </Row>
        <!--入库列表-->
        <Row :gutter="24" type="flex" v-show="currentTab === '2'">
          <Col span="24">
            <FormItem label="箱子总数：" props="spec_type">
              {{ manyFormValidate.length }}
            </FormItem>
          </Col>
          <!-- 箱子添加-->
          <Col span="24">
            <FormItem label="箱子列表：">
              <Table
                  :data="manyFormValidate"
                  :columns="header"
                  border
              >
                <template slot-scope="{ row, index }" slot="caseName">
                  <p>{{ manyFormValidate[index].caseName }}</p>
                </template>
                <template slot-scope="{ row, index }" slot="items">
                  <Table
                      :data="manyFormValidate[index].items"
                      :columns="freightHeader"
                      class="freight-table-header"
                      size="small"
                      :showHeader="false"
                  >
                    <template slot-scope="{ row:nestedRow, index:itemsi }" slot="omsSku">
                      <Select
                          v-model="manyFormValidate[index].items[itemsi].omsSku"
                          clearable
                          filterable
                          transfer="true"
                          placeholder="请选择SKU"
                      >
                        <Option
                            v-for="(freight, i) in freightList"
                            :value="freight.label"
                            :key="freight.value"
                        >{{ freight.label }}</Option>
                      </Select>
                    </template>
                    <template slot-scope="{ row:quantityRow, index:quantityi }" slot="quantity">
                      <InputNumber
                          v-model="manyFormValidate[index].items[quantityi].quantity"
                          :min="0"
                          class="priceBox"
                      ></InputNumber>
                    </template>
                    <template slot-scope="{ row:quantityRow, index:quantityi }" slot="action">
                      <a @click="delProduct(index,quantityi)">删除</a>
                    </template>
                  </Table>
                  <a @click="addProduct(index)">添加产品</a>
                </template>
                <template slot-scope="{ row, index }" slot="all_quantity">
                  {{ calculateAllQuantity(index)}}
                </template>
                <template slot-scope="{ row, index }" slot="action">
                  <a @click="delBox(index)">删除</a>
                </template>
              </Table>
              <a @click="addBox">添加箱子</a>
            </FormItem>
          </Col>
        </Row>
        <!-- 其他设置-->
        <Row v-show="currentTab === '3'">
          <Col span="24">
            <FormItem label="备注：" prop="">
              <Input
                  v-model="formValidate.remark"
                  type="textarea"
                  :rows="5"
                  placeholder="请输入商品备注"
                  v-width="'50%'"
              />
            </FormItem>
          </Col>
        </Row>
        <Spin size="large" fix v-if="spinShow"></Spin>
      </Form>
    </Card>
    <Card :bordered="false" dis-hover class="fixed-card" :style="{left: `${!menuCollapse?'200px':isMobile?'0':'80px'}`}">
      <Form>
        <FormItem>
          <Button v-if="currentTab !== '1'" @click="upTab">上一步</Button>
          <Button
              type="primary"
              class="submission"
              v-if="currentTab !== '3'"
              @click="downTab('formValidate')"
          >下一步</Button>
          <Button
              type="primary"
              :disabled="openSubimit"
              class="submission"
              @click="handleSubmit('formValidate')"
              v-if="$route.params.id || currentTab === '3'"
          >保存</Button>
        </FormItem>
      </Form>
    </Card>
  </div>
</template>

<script>
import Setting from "@/setting";
import util from "@/libs/util";
import uploadPictures from "@/components/uploadPictures";
import wangeditor from "@/components/wangEditor/index.vue";

import labelList from "@/components/labelList";
import couponList from "@/components/couponList";
import goodsList from '@/components/goodsList/index';
import {
  parcelList
} from "@/api/product";
export default {
  name: "inboundAdd",
  components: {
    uploadPictures,
    goodsList,
    couponList,
    labelList,
    wangeditor,
    draggable: vuedraggable,
  },
  data() {
    return {
      freightList:[],
      roterPre: Setting.roterPre,
      headTab: [
        { title: "基础信息", name: "1" },
        { title: "入库列表", name: "2" },
        { title: "选项", name: "3" },
      ],
      type: 0,
      spinShow: false,
      openSubimit: false,
      formValidate: {
        delivery_type:0,//送达方式
        ship_date:0,//预计发货日期
        order_nos:"",//采购订单号，多个逗号分隔
        tracking_number:"",//采购订单号
        remark: "",
        id: 0,
        spec_type: 0,
        attrs:[],
      },
      freightHeader: [
        {
          align: "center",
          minWidth: 200,
          slot: "omsSku",
          title: "SKU",
        },
        {
          align: "center",
          minWidth: 80,
          slot: "quantity",
          title: "数量",
        },
        {
          align: "center",
          minWidth: 80,
          slot: "action",
          title: "操作",
        },
      ],
      header: [
        {
          align: "center",
          minWidth: 100,
          slot: "caseName",
          title: "箱号",
        },
        {
          align: "center",
          minWidth: 500,
          slot: "items",
          title: "产品",
          renderHeader: h => h('div', { style: { display: 'flex', flexDirection: 'column', alignItems: 'center',width:"500px" } }, [
            // 第一行：产品
            h('div', { style: { marginBottom: '4px', fontWeight: 'bold' } }, '产品'),

            // 第二行：三个小格子
            h('div', {
              style: { display: 'flex', justifyContent: 'space-between', width: '100%',borderTop:'1px solid #ebeef5' }
            }, [
              h('span', { style: { textAlign: 'center',borderRight:'1px solid #ebeef5', width:'50%' } }, 'SKU'),
              h('span', { style: { textAlign: 'center', borderRight:'1px solid #ebeef5', width:'25%'} }, '数量'),
              h('span', { style: { textAlign: 'center', borderRight:'0px solid #ebeef5', width:'25%' } }, '操作')
            ])
          ])
        },
        {
          align: "center",
          minWidth: 100,
          slot: "all_quantity",
          title: "总数量",
        },
        {
          align: "center",
          minWidth: 130,
          slot: "action",
          title: "操作",
        },
      ],
      distanceSelect:[
        {
          value: 'cm',
          label: 'cm'
        },
        {
          value: 'in',
          label: 'in'
        },
      ],
      massSelect:[
        {
          value: 'lb',
          label: 'lb'
        },
        {
          value: 'kg',
          label: 'kg'
        },
      ],
      manyFormValidate: [],
      images: [],
      currentTab: "1",
      isChoice: "",
      modalPic: false,
      picTit: "",
      tableIndex: 0,
      ruleValidate: {
        store_info: [
          { required: true, message: "请输入商品简介", trigger: "blur" },
        ],
      },
      upload: {
        videoIng: false, // 是否显示进度条；
      },
      videoIng: false, // 是否显示进度条；
      progress: 0, // 进度条默认0
      videoLink: "",
      arrivalTypeData:[
        {
          "children": [],
          "value": 1,
          "label": "仓库卡车服务",
          "pid": 0
        },
        {
          "children": [],
          "value": 3,
          "label": "客户自提",
          "pid": 0
        },
      ],
      datePickerOptions: {
        disabledDate (date) {
          return date && date.valueOf() < Date.now() - 86400000;
        }
      },
    };
  },
  computed: {
    ...mapState("admin/layout", ["isMobile","menuCollapse"]),
    labelWidth() {
      return this.isMobile ? undefined : 120;
    },
    labelPosition() {
      return this.isMobile ? "top" : "right";
    },
    endPickOptions() {
      const that = this;
      return {
        disabledDate(time) {
          return ''
        }
      }
    },
  },
  created() {
    this.getToken();
    this.getParcelList();
  },
  mounted() {
    this.setCopyrightShow({ value: false });
    if ((this.$route.params.id !== "0" && this.$route.params.id) || this.$route.query.copy) {
      this.getInfo();
    } else if (this.$route.params.id === "0") {

    }
    if(this.$route.query.type){
      this.type = this.$route.query.type;
    }else {
      this.type = 0;
    }
  },
  methods: {
    ...mapMutations('admin/layout', [
      'setCopyrightShow'
    ]),
    getParcelList() {
      parcelList({})
          .then(async (res) => {
            let data = res.data;
            this.freightList = data.list
          })
          .catch((res) => {
            this.$Message.error(res.msg);
          });
    },
    // 计算产品总数量
    calculateAllQuantity(index) {
      var quantity = 0
      this.manyFormValidate[index].items.forEach(item => {
        quantity += item.quantity
      })
      return quantity
    },
    //删除箱子
    delBox(index){
      this.manyFormValidate.splice(index, 1);
    },
    //添加箱子
    addBox() {
      this.manyFormValidate.push({
        caseName:this.today()+"-F" +this.manyFormValidate.length+1,
        quantity:0,
        distanceUnit:"cm",
        massUnit:"kg",
        trackingNumber:"",
        remark:"",
        length:0,
        width:0,
        height:0,
        weight1:0,
        weight2:0,
        inboundingType:0,
        items:[]
      });
    },
    //删除产品
    delProduct(index,quantityi){
      this.manyFormValidate[index].items.splice(quantityi, 1);
    },
    //添加产品
    addProduct(index) {
      this.manyFormValidate[index].items.push({
        omsSku:"",
        quantity:0
      },);
    },
    today() {
      // 获取当前日期对象
      const currentDate = new Date();
      // 获取年份的后两位
      let year = currentDate.getFullYear().toString().slice(-2);

      // 获取月份，注意 getMonth() 返回值是 0 - 11，所以要加 1
      let month = (currentDate.getMonth() + 1).toString();
      // 如果月份是个位数，前面补零
      if (month.length === 1) {
        month = '0' + month;
      }
      // 获取日期
      let day = currentDate.getDate().toString();
      // 如果日期是个位数，前面补零
      if (day.length === 1) {
        day = '0' + day;
      }
      // 拼接成最终格式
      const formattedDate = year + month + day;
      return  formattedDate
    },

    //设置预计到货时间
    onchangeOff(e){
      this.formValidate.estimate_arrive_time = e
    },

    initBran(data){
      data.map(item=>{
        item.value = item.value.toString();
        if(item.children && item.children.length){
          this.initBran(item.children);
        }
      })
    },
    cancel() {
      this.$router.push({path:`${Setting.roterPre}/freight/index`});
    },

    // 上传头部token
    getToken() {
      this.header["Authori-zation"] = "Bearer " + util.cookies.get("token");
    },
    infoData(data){
      this.formValidate = data;
      this.formValidate.header = [];
    },

    //对象数组去重；
    unique(arr) {
      const res = new Map();
      return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
    },
    // 运费模板
    getList() {

    },
    // 上一页；
    upTab() {
      if(this.currentTab==3){
        this.currentTab = (Number(this.currentTab) - 2).toString();
      }else{
        this.currentTab = (Number(this.currentTab) - 1).toString();
      }
    },
    // 下一页；
    downTab(name) {
      this.$refs[name].validate((valid) => {
        if (valid) {
          if(this.currentTab==3){
            this.currentTab = (Number(this.currentTab) + 2).toString();
          }else{
            this.currentTab = (Number(this.currentTab) + 1).toString();
          }
        }else{
          this.$Message.warning("请完善数据");
        }
      })
    },
    // 详情
    getInfo() {
      let that = this;
      that.spinShow = true;
      // freightInfoApi(that.$route.params.id || this.$route.query.copy)
      //     .then((res) => {
      //       let data = res.data.freightInfo;
      //       this.infoData(data);
      //       this.spinShow = false;
      //     })
      //     .catch((res) => {
      //       this.spinShow = false;
      //       this.$Message.error(res.msg);
      //     });
    },
    // tab切换
    onhangeTab(name) {
      this.currentTab = name;
    },
    // 关闭图片上传模态框
    changeCancel(msg) {
      this.modalPic = false;
    },

    // 提交
    handleSubmit(name) {
      this.$refs[name].validate((valid) => {
        if (valid) {
          this.openSubimit = false;
          this.formValidate.attrs = this.manyFormValidate;

          // freightAddApi(this.formValidate)
          //     .then(async (res) => {
          //       this.openSubimit = true;
          //       this.$Message.success(res.msg);
          //       if (this.$route.params.id === "0") {
          //         cacheDelete().catch((err) => {
          //           this.$Message.error(err.msg);
          //         });
          //       }
          //       setTimeout(() => {
          //         this.$router.push({ path: `${Setting.roterPre}/freight/index` });
          //       }, 500);
          //     })
          //     .catch((res) => {
          //       this.openSubimit = false;
          //       this.$Message.error(res.msg);
          //     });
        }
      });
    },
    // 表单验证
    validate(prop, status, error) {
      if (status === false) {
        this.$Message.warning(error);
      }
    },
  },
};
</script>
<style scoped lang="stylus">
.video-style {
  width: 100%;
  height: 100% !important;
  border-radius: 10px;
}
.select-add {
  width: 200px;
  margin-left: 6px;
  margin-right: 10px
}
.input-display {
  display: none
}
.width-add {
  width:200px;
}
.custom-input {
  width: 100px;
  margin-right: 10px
}
.asterisk{
  position relative;
  .asteriskInfo{
    position absolute;
    color #ed4014;
    left 73px;
    top 8px;
    &.on{
      left:62px;
    }
  }
}
.specsList {
  /deep/.ivu-table-header table{
    border:0!important
  }
  /deep/.ivu-table-header thead tr th{
    padding 0!important
    background-color #EEEEEE!important;
  }
  /deep/.ivu-table-cell{
    padding 0!important
  }
  /deep/.ivu-table-border th, /deep/.ivu-table-border td{
    border-right unset;
  }
  /deep/.ivu-table td{
    height 59px;
  }
  &.on{
    width 50% !important;
    /deep/.ivu-table{
      width 100% !important;
    }
    /deep/.ivu-table td{
      height 40px;
      padding 0 !important;
    }
    /deep/.ivu-table-cell{
      padding 0 16px !important;
    }
  }
}
.form-submit {
  /deep/.ivu-card{
    border-radius: 0;
  }
  margin-bottom: 79px;
  .fixed-card {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 200px;
    z-index: 20;
    box-shadow: 0 -1px 2px rgb(240, 240, 240);

    /deep/ .ivu-card-body {
      padding: 15px 16px 14px;
    }

    .ivu-form-item {
      margin-bottom: 0;
    }

    /deep/ .ivu-form-item-content {
      margin-right: 124px;
      text-align: center;
    }

    .ivu-btn {
      height: 36px;
      padding: 0 20px;
    }
  }
}
.seeCatMy {
  color: #2d8cf0;
  cursor: pointer;
}
.addCustom_content {
  margin-top: 20px;

  .custom_box {
    margin-bottom: 10px;
  }

  .addfont {
    display: inline-block;
    font-size: 13px;
    font-weight: 400;
    color: #1890FF;
    cursor: pointer;
  }
}

.addCustomBox {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 400;
  color: #1890FF;

  .btn {
    cursor: pointer;
    width: max-content;
  }
}
.checkAlls /deep/.ivu-checkbox-inner{
  width 14px;
  height 14px;
}
.checkAlls /deep/.ivu-checkbox-wrapper{
  font-size 12px;
}
.lines {
  border-bottom: 1px dashed #eee;
  margin-bottom: 20px;
}
.iosfont{
  font-size 20px!important;
}
.selectOn{
  color #2d8cf0;
}
.ifam {
  width: 344px;
  height: 644px;
  background: url('../../../assets/images/phonebg.png') no-repeat center top;
  background-size: 344px 644px;
  padding: 40px 20px;
  padding-top: 50px;
  margin: 0 auto 0 20px;

  .content {
    height: 560px;
    overflow: hidden;
    scrollbar-width: none; /* firefox */
    -ms-overflow-style: none; /* IE 10+ */
    overflow-x: hidden;
    overflow-y: auto;
  }

  .content::-webkit-scrollbar {
    display: none; /* Chrome Safari */
  }
}
.offShow{
  position absolute
}
.goodsShow /deep/.ivu-radio-group-vertical .ivu-radio-wrapper{
  height 35px;
  line-height 35px;
}
.videbox {
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 4px;
  border: 1px dashed #DDDDDD;
  line-height: 50px;
  text-align: center;
  color: #898989;
  font-size: 30px;
  font-weight: 400;
  cursor: pointer;
}
.brandName{
  /deep/.ivu-cascader{
    display inline-block
  }
}
.formValidate{
  .addClass{
    color: #1890FF;
    margin-left 14px;
    padding 9px 0;
    cursor pointer;
  }
}
.freightType {
  width: 120px;
  height: 60px;
  background: #FFFFFF;
  border-radius: 3px;
  border: 1px solid #E7E7E7;
  float: left;
  text-align: center;
  padding-top: 8px;
  position: relative;
  cursor: pointer;
  line-height: 23px;
  margin-right 12px;

  &.on{
    border-color #1890FF;
  }

  .name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.85);
  }

  .title {
    font-size: 12px;
    font-weight: 400;
    color: #999999;
  }

  .jiao {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-bottom: 26px solid #1890FF;
    border-left: 26px solid transparent;
  }

  .iconfont {
    position: absolute;
    bottom: -3px;
    right: 1px;
    color: #FFFFFF;
    font-size 12px;
  }

}
.labelInput{
  border: 1px solid #dcdee2;
  width 50%;
  padding 0 5px;
  border-radius 5px;
  min-height 30px;
  cursor pointer;
  .span{
    color: #c5c8ce;
  }
  .iconxiayi{
    font-size 12px
  }
}
.labelClass{
  /deep/.ivu-form-item-content{
    line-height unset;
  }
}
.ivu-checkbox-wrapper{
  margin-right 19px;
}
.list-group {
  margin-left: -8px;
}

.borderStyle {
  border: 1px solid #ccc;
  padding: 8px;
  border-radius: 4px;
}

.drag {
  cursor: move;
}

.move-icon {
  width: 30px;
  cursor: move;
  margin-right: 10px;
}

.move-icon .icondrag2 {
  font-size: 26px;
  color: #d8d8d8;
}

.maxW /deep/.ivu-select-dropdown {
  max-width: 600px;
}

#shopp-manager .ivu-table-wrapper {
  border-left: 1px solid #dcdee2;
  border-top: 1px solid #dcdee2;
}

.noLeft {
  >>> .ivu-form-item-content {
    margin-left: 0 !important;
  }
}

#shopp-manager .ivu-form-item .tips {
  display: inline-bolck;
  font-size: 12px;
  font-weight: 400;
  color: #999999;
  margin-top: 14px;
}

.iview-video-style {
  width: 40%;
  height: 180px;
  border-radius: 10px;
  background-color: #707070;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
}

.iview-video-style .iconv {
  color: #fff;
  line-height: 180px;
  width: 50px;
  height: 50px;
  display: inherit;
  font-size: 26px;
  position: absolute;
  top: -74px;
  left: 50%;
  margin-left: -25px;
}

.iview-video-style .mark {
  position: absolute;
  width: 100%;
  height: 30px;
  top: 0;
  background-color: rgba(0, 0, 0, 0.5);
  text-align: center;
}

.uploadVideo {
  margin-left: 10px;
}

.submission {
  margin-left: 10px;
}
.form-submit .fixed-card .ivu-btn {
  height:32px;
}

.color-list .tip {
  color: #c9c9c9;
}

.color-list .color-item {
  width 70px;
  height: 28px;
  line-height: 28px;
  color: #fff;
  margin-right: 10px;
  border-radius 2px;
  text-align center
  .num{
    color #1890FF;
    width 14px;
    height 14px;
    text-align center;
    line-height 14px;
    border-radius 50%;
    background-color #fff;
    margin-right 6px;
  }
}

.color-list .color-item.blue {
  background-color: #1E9FFF;
}

.color-list .color-item.yellow {
  background-color: rgb(254, 185, 0);
}

.color-list .color-item.green {
  background-color: #009688;
}

.color-list .color-item.red {
  background-color: #ed4014;
}

.color-list .color-item.colorBlue {
  background: linear-gradient(270deg, #5ECFFF 0%, #0084FF 100%);
}

.columnsBox {
  margin-right: 10px;
}

.priceBox {
  width: 100%;
}

.rulesBox {
  display: flex;
  flex-wrap: wrap;
}

.pictrueBox {
  display: inline-block;
}

.pictrueTab {
  width: 40px !important;
  height: 40px !important;
}

.pictrue {
  width: 60px;
  height: 60px;
  border: 1px dotted rgba(0, 0, 0, 0.1);
  margin-right: 15px;
  margin-bottom 10px;
  display: inline-block;
  position: relative;
  cursor: pointer;

  img {
    width: 100%;
    height: 100%;
  }

  .btndel {
    position: absolute;
    z-index: 1;
    width: 20px !important;
    height: 20px !important;
    left: 46px;
    top: -4px;
  }
}

.upLoad {
  width: 58px;
  height: 58px;
  line-height: 58px;
  border: 1px dotted rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.02);
  cursor: pointer;
}

.curs {
  cursor: pointer;
}

.inpWith {
  width: 60%;
}

.labeltop {
  >>> .ivu-form-item-label {
    float: none !important;
    display: inline-block !important;
    margin-left: 120px !important;
    width: auto !important;
  }
  .icondrop-down{
    font-size: 12px;
    margin-left: 5px;
  }
}

.video-icon {
  background-image: url('https://cdn.oss.9gt.net/prov1.1/1/icons.png'); // cdn.oss.9gt.net/prov1.1/1/icons.png);
  // background-color: #fff;
  background-position: -9999px;
  background-repeat: no-repeat;
}
.progress {
  margin-top: 10px;
}
.new_tab {
  >>>.ivu-tabs-nav .ivu-tabs-tab{
    padding:4px 16px 20px !important;
    font-weight: 500;
  }
}
.freight-table-header .ivu-table .ivu-table-header thead th {
  height: 30px!important; /* 设置表头高度 */
  line-height: 30px!important; /* 设置表头行高，使内容垂直居中 */
}
</style>